const add0 = (n)=> n-0 < 10 ? `0${n}` : n

function getTime(){
    const dt = new Date(),
        y = dt.getFullYear(),
        o = dt.getMonth()+1,
        d = dt.getDate(),
        h = dt.getHours(),
        m = dt.getMinutes(),
        s = dt.getSeconds()

    return `${add0(y)}-${add0(o)}-${add0(d)}  ${add0(h)}:${add0(m)}:${add0(s)}`
}

export default getTime